{extend name="layout/base"}

{block name="title"}欢迎{/block}

{block name="main"}
<div class="right-main">
    <div class="mdui-card border-1 mdui-shadow-0 mdui-m-b-2">
        <div class="mdui-card-primary">
            <h3>欢迎</h3>
        </div>
        <div class="mdui-divider"></div>
        <div class="mdui-card-content">
            <div class="mdui-typo">
                <blockquote>
                    <p>欢迎登录 {:session('admin.username')}  登录MuxAdmin后台管理系统</p>
                </blockquote>
            </div>
        </div>

    </div>
    <div class="mdui-card border-1 mdui-shadow-0 mdui-m-b-2">
        <div class="mdui-card-primary">
            数据统计
        </div>
        <div class="mdui-divider"></div>
        <div class="flex-box">
            <div class="card-box border-1">
                <p>管理员: {$admin}</p>
            </div>
            <div class="card-box border-1">
                <p>文章: {$art_num}</p>
            </div>
            <div class="card-box border-1">
                <p>分类数: {$cate}</p>
            </div>
        </div>
    </div>
    <div class="mdui-card border-1 mdui-shadow-0 mdui-m-b-2 ">
        <div class="mdui-card-primary">
            最新文章
        </div>
        <div class="mdui-divider"></div>
        <div class="mdui-table-fluid mdui-m-t-1 mdui-m-a-1 mdui-shadow-0 ">
            <table class="mdui-table mdui-table-hoverable">
                <thead>
                <tr>
                    <th>#</th>
                    <th>标题</th>
                    <th>分类</th>
                    <th>时间</th>
                </tr>
                </thead>
                <tbody>
                {foreach $art as $k=>$vo}
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.title}</td>
                    <td>{$vo.category.name}</td>
                    <td>{$vo.create_time}</td>
                </tr>
                {/foreach}
                </tbody>
            </table>
        </div>
    </div>
</div>
{/block}